import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Test from '../views/Test.vue'
import Main from '../components/Main.vue'
import Red from '../views/Red.vue'
import Yellow from '../views/Yellow.vue'
import Login from '../views/Login.vue'
import Mainpage from '../views/Mainpage.vue'
import About from '../views/About.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: Main,
    redirect: '/red',
    children: [{
      path: '/red',
      component: Red
    },
    {
      path: '/yellow',
      component: Yellow
    }]
  },
  {
    path: '/login',
    component: Login
  },
  {
    path: '/mainpage',
    component: Mainpage
  },
  {
    path: '/about',
    component: About
  },
  {
    path: '/Home',
    component: Home
  },
  {
    path: '/abc',
    name: 'Test',
    component: Test
  }
]

const router = new VueRouter({
  routes
})

export default router
